home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / disk / misc / TransADF.lha / Source / version.c < prev    next >
C/C++ Source or Header  |  1997-12-08  |  3KB  |  82 lines

  1. /*-------------------------------*/
  2. /* Version information and usage */
  3. /*-------------------------------*/
  4.  
  5. /* COMPILE_LITE takes precedence over COMPILE_RT */
  6. #ifdef COMPILE_LITE
  7. #  ifdef COMPILE_RT
  8. #    undef COMPILE_RT
  9. #  endif /* COMPILE_RT */
  10. #endif /* COMPILE_LITE */
  11.  
  12. #include <exec/types.h>
  13. #include <dos/dos.h>
  14. #include <clib/dos_protos.h>
  15.  
  16. #include "version.h"
  17. #include "main.h"
  18. #include "zlib.h"
  19.  
  20.  
  21. /* Any procedure that needs to access these macros should be kept here.  */
  22. /* This prevents any module from needing to be recompiled just to change */
  23. /* the program's name, version or date.                                  */
  24.  
  25. #ifdef COMPILE_LITE
  26. #  define PROG_NAME  "TransADF-Lite"
  27. #else /* ifndef COMPILE_LITE */
  28. #  ifdef COMPILE_RT
  29. #    define PROG_NAME  "TransADF-RT"
  30. #  else /* ifndef COMPILE_RT ( && ifndef COMPILE_LITE) */
  31. #    define PROG_NAME  "TransADF"
  32. #  endif /* COMPILE_RT */
  33. #endif /* COMPILE_LITE */
  34.  
  35. #define PROG_VER   "3.72"
  36. #define PROG_DATE  "8th December 1997"
  37.  
  38. const char VerString[] = "$VER: "PROG_NAME" "PROG_VER" ("PROG_DATE")\r\n\0";
  39. #ifndef COMPILE_LITE
  40. const char ZipComment[] = "Created with "PROG_NAME" v"PROG_VER".\n\
  41. "PROG_NAME" Copyright (c) Karl J. Ots, "PROG_DATE".";
  42. #endif /* COMPILE_LITE */
  43.  
  44.  
  45. /*
  46. ** Output program usage to StdErr and call cleanExit()
  47. */
  48. void outputUsage (void)
  49. {
  50.   FPuts (StdErr,
  51.         "\033[1m"PROG_NAME" v"PROG_VER" © "PROG_DATE" Karl J. Ots\033[0m\n");
  52. #ifndef COMPILE_LITE
  53.   FPrintf (StdErr, " Incorperating ZLib %s", zlibVersion());
  54. #  ifdef COMPILE_RT
  55.   FPrintf (StdErr, ", using z.library %ld.%ld", ZBase->lib_Version,
  56.                                                 ZBase->lib_Revision);
  57. #  endif /* COMPILE_RT */
  58.   FPuts (StdErr, "\n");
  59. #endif /* COMPILE_LITE */
  60.   
  61.   FPrintf (StdErr, "\nUsage:\t%s\n\n", TA_Template);
  62.   
  63.   FPuts (StdErr, "\tDRIVE\tDisk drive to operate on (Required).\n");
  64.   FPuts (StdErr, "\tFILE\tName of Amiga Disk File or Archive (Required).\n");
  65.   FPuts (StdErr, "\tSTART\tTrack to begin operation at (Default 0).\n");
  66.   FPuts (StdErr, "\tEND\tTrack to stop operation at (Default 79).\n");
  67.   FPuts (StdErr, "\tWRITE\tWrite from FILE to DRIVE.\n");
  68. #ifdef COMPILE_LITE
  69.   FPuts (StdErr, "\tZLIB, GZIP, PKZIP, NAME, LEVEL, ADD\n");
  70.   FPuts (StdErr, "\t\tDisabled in Lite version.\n");
  71. #else /* ifndef COMPILE_LITE */
  72.   FPuts (StdErr, "\tZLIB\tCompress disk into a ZLib file.\n");
  73.   FPuts (StdErr, "\tGZIP\tCompress disk into a GZip file.\n");
  74.   FPuts (StdErr, "\tPKZIP\tCompress disk into a PKZip file.\n");
  75.   FPuts (StdErr, "\tNAME\tName to store in file or file to dearchive.\n");
  76.   FPuts (StdErr, "\tLEVEL\tCompression level, 1 - 9 (Default 6).\n");
  77.   FPuts (StdErr, "\tADD\tAdd disk to PKZip archive.\n");
  78. #endif /* COMPILE_LITE */
  79.   FPuts (StdErr, "\n");
  80.   cleanExit (RETURN_FAIL, ERROR_REQUIRED_ARG_MISSING);
  81. }
  82.